package com.tpo.jnotes.client.layer.view.dialogs.listeners;

import java.awt.event.WindowEvent;
import java.awt.event.WindowFocusListener;

import com.tpo.jnotes.client.layer.view.dialogs.NBaseFrame;

public class NFrameFocusListener implements WindowFocusListener
{

    private final NBaseFrame noteFrame;

    public NFrameFocusListener( NBaseFrame aNoteFrame )
    {
        noteFrame = aNoteFrame;
    }

    @Override
    public void windowGainedFocus( WindowEvent aE )
    {
    }

    @Override
    public void windowLostFocus( WindowEvent aE )
    {
        noteFrame.save();
    }

}
